package at.jaki.ubb.crawling.api.filters;

import at.jaki.ubb.crawling.components.FilterChain;

/**
 * provides the generic interface for every filter used by the Crawling engine.
 * 
 * @author Attila Jakabfi
 * @param D generic type of Filter
 */
public interface CEFilter<D> {

	/**
	 * This method will be called by the {@link FilterChain}
	 * 
	 * @param d elem to decide on.
	 * @return what should happen to the element
	 */
	FilterResult doFilter(D d);

	/**
	 * Resets the filter state to the initial value. This method will be called,
	 * when the Crawling engine is reset.
	 */
	void reset();

}
